package com.example.demo.nosql.config;

import java.util.Properties;
import org.noear.esearchx.EsContext;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;

/**
 * @author airhead
 */
@Configuration
public class EsConfig {
  /**
   * url,username,password
   *
   * @param properties
   * @return
   */
  @Bean(name = "esContext", typed = true)
  public EsContext esContext(@Inject("${demo.es}") Properties properties) {
    return new EsContext(properties);
  }
}
